home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / sal100 / shaker.src < prev    next >
Text File  |  1993-05-29  |  327b  |  22 lines

  1. void shaker()
  2. {
  3.   int a;
  4.   int b;
  5.   int c;
  6.  
  7.   a = ARRAYSIZE-1;
  8.   b = 0;
  9.  
  10.   do
  11.   {
  12.     for (c = b; c < a; c++)
  13.       if (Vektor[c] > Vektor[c+1])
  14.         SwapNumbers(c,c+1);
  15.     a--;
  16.     for (c = a; c >= b; c--)
  17.       if (Vektor[c] > Vektor[c+1])
  18.         SwapNumbers(c,c+1);
  19.     b++;
  20.   }
  21.   while (a >= b);
  22. }